{% set posts = __SELF__.posts %}

<ul class="post-list">
    {% for post in posts %}
        <li class="">
            <a target="_blank" class="post-title" style="font-size: 20px;"  href="{{ post.url }}" >
            {{ post.title }}
            </a>

            <p class="info">
                {% for category in post.categories %}
                    <a style="color:#349edf" href="{{ category.url }}">{{ category.name }}</a>{% if not loop.last %}, {% endif %}
                {% endfor %}
                <b style="color: #999">{{ post.published_at|date('Y-m-d H:i:s') }}</b>
            </p>

            <!--<p class="excerpt">{{ post.summary|raw }}</p>-->
        </li>
    {% else %}
        <li class="no-data">{{ noPostsMessage }}</li>
    {% endfor %}
</ul>

{% if posts.lastPage > 1 %}
    <ul class="pagination">
        {% if posts.currentPage > 1 %}
            <li><a href="{{ this.page.baseFileName|page({ (pageParam): (posts.currentPage-1) }) }}">&larr; Prev</a></li>
        {% endif %}

        {% for page in 1..posts.lastPage %}
            <li class="{{ posts.currentPage == page ? 'active' : null }}">
                <a href="{{ this.page.baseFileName|page({ (pageParam): page }) }}">{{ page }}</a>
            </li>
        {% endfor %}

        {% if posts.lastPage > posts.currentPage %}
            <li><a href="{{ this.page.baseFileName|page({ (pageParam): (posts.currentPage+1) }) }}">Next &rarr;</a></li>
        {% endif %}
    </ul>
{% endif %}